//
// Created by acer on 2018/4/26.
//
#include<stdio.h>
#include<string.h>

#define true 1
#define false 0
typedef char bool;

struct TreeNode {
    int val;
    struct TreeNode *left;
    struct TreeNode *right;
};

//二叉树先序遍历
int* PreOrder(struct TreeNode* root){
    static int *array;
    if(root != NULL) {

        *array = root->val;
        array++;
        PreOrder(root->left);
        PreOrder(root->right);
    }
    return array;

}

//宝石与石头
int numiewelsInStones(char* J, char* S) {
    int list['z'-'A'+1]={0}, len_J=strlen(J), len_S=strlen(S), sum=0;
    for (int i = 0; i < len_S; ++i) {
        list[S[i] - 'A'] += 1;
    }
    for (int j = 0; j < len_J; ++j) {
        sum += list[J[j] - 'A'];
    }
    return sum;
}



/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */

//对称二叉树
bool isSymmetric(struct TreeNode* root) {

}







